#!/usr/bin/python

import web
import os
from pymongo import MongoClient

urls = ("/", "index", "/2.14.0/")
application = web.application(urls, globals())
render = web.template.render("templates")

client = MongoClient()
db = client['tut']
collection = db['codenames']

class index:
    def GET(self):
        return render.index(list(collection.find()))

application.run()

